package org.fileCopier.ui;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;

import org.fileCopier.beans.InputBean;


public class MainUI {
	public static BufferedReader in=new BufferedReader(new InputStreamReader(System.in));	
	public InputBean getInput(){
		String inputDir=null;
		String outputDir=null;
		try {
			System.out.println("Enter Input Directory ");
			inputDir=in.readLine();
			System.out.println("Enter Output Directory ");
			outputDir=in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
			return null;	
		}
		File input=new File(inputDir);
		File output=new File(outputDir);
		if(input.isDirectory() && output.isDirectory()){
			InputBean inputBean = new InputBean();
			inputBean.setInputSrc(input);
			inputBean.setDestSrc(output);
			return inputBean;			
		}			
		return null;		
	}
	
}
